﻿using Domain.Entity.ic;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.Check_hService
{
    public interface ICheck_hService
    {
        //分页查询盘点单
        Task<FenYe<Check_h>> GetCheck_h(FenYe<Check_h> fenYe, string? code, string? type, int? status, int? whid);

        //高级查询
        Task<FenYe<Check_h>> GetAdvancedCheck_h(FenYe<Check_h> fenYe, string? code, string? startdate, string? enddate, int? status, string? type, int? whid, string? createname, string? startcreatetime, string? endcreatetime, string? approvername, string? startapprovertime, string? endapprovertime, string? inuser);

        //添加盘点单
        Task<int> AddCheck_h(AddCheck_hDto addCheck_HDto);

        //修改盘点单
        Task<int> UpdateCheck_h(UpdateCheck_hDto updateCheck_HDto);

        //删除盘点单
        Task<int> DeleteCheck_h(int id);

        //查询盘点单
        Task<Check_h> GetCheck_hById(int icid);


        //查询盘盈的单据
        Task<List<Check_h>> Getying();

        //查询盘亏的单据
        Task<List<Check_h>> Getkui();

        //修改出入库状态
        Task<int> UpdateStatus(string name, int status, int ic_id);

        //根据单号查询主键ID
        Task<int> Getid(string code);

        //盘点需要汇总信息
        Task<CheckTotals> Gettotal(
            string? proc_code, string? ic_code, string? ic_type, string? create_name,
            int? type_id, string? proc_primary_unit, int? wh_id, string? ic_user,
            string? createstartTime, string? createendTime,
            decimal? checkprofitNumMin, decimal? checkprofitNumMax,
            decimal? checklossesNumMin, decimal? checklossesNumMax,
            decimal? checkprofitTotalMin, decimal? checkprofitTotalMax,
            decimal? checklossesTotalMin, decimal? checklossesTotalMax,
            int[]? icStatusArray);

        //查询货品盘点记录
        Task<List<Check_h>> GetByPid(int procid);
    }
}
